
		<div class="ui-portlet">
			{{template wxes/_user_wxes}}
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;135公众平台</a></li>
			  <li class="active">参数配置</li>
			  {{if $current_wxinfo}}
			  	<li>公众号：{{$current_wxinfo['Wx']['name']}}</li>
			  {{/if}}
			</ol>
		</div>       
       <hr>
       
       <style>
		.radios input[type="radio"]{margin-left:20px;}
		</style>
		
       <p class="text-right">       	
       	<!-- <a href="{{$this->Html->url('/user_settings/setting?type=preview')}}">预览设置</a> -->
       </p>
       <ul id="settings-tab" class="nav nav-tabs">
       	<li  {{if !in_array($_REQUEST['type'],array('company','fonts','dev'))}}class="active"{{/if}}><a href="#warter-mark-setting" data-toggle="tab"><span>水印设置</span></a></li>
		{{if $wx_id}}<li  {{if $_REQUEST['type'] == 'dev'}} class="active"{{/if}}><a href="#wechat-dev-setting" data-toggle="tab"><span>开发者设置</span></a></li>{{/if}}
		<li  {{if $_REQUEST['type'] == 'fonts'}} class="active"{{/if}}><a href="#font-setting" data-toggle="tab"><span>字体设置</span></a></li>
		   <li  {{if $_REQUEST['type'] == 'pay'}} class="active"{{/if}}><a href="#pay-setting" data-toggle="tab"><span>支付设置</span></a></li>
		{{if $CurrentUser['Company']}}<li><a href="#wechat-company-setting" data-toggle="tab"><span>企业号设置</span></a></li>{{/if}}
	</ul>
{{$this->Form->create('UserSetting',array('class'=>'form-horizontal','role'=>'form'))}}
<div class="tab-content">
	<input type="hidden" name="manage_wxid" value="{{$manage_wxid}}">

	<input type="hidden" name="data[UserSetting][referer]" value="/user_settings/setting?type={{$_REQUEST['type']}}">

	{{if $current_wxinfo && $_GET['type'] == 'preview'}}
	
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">预览微信号</label>
			<div class="col-sm-9 controls">
				<span>{{$values['preview_wechats']['value']}}</span>
			</div>
		</div>
		{{if $errmsg}}
			<p class="alert alert-warning">{{$errmsg}}</p>
		{{else}}
			<img src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket={{$ticket}}">
			<p>扫描二维码后，扫描的微信号直接设为预览微信号，可设置多个预览账号</p>
		{{/if}}
	
	{{else}}	
		<br>

	<div class="tab-pane  {{if $_REQUEST['type'] == 'pay'}}active{{/if}}" id="pay-setting">

		<div class="form-group">
			<label class="col-sm-3 control-label" for="UserSettingMchId">微信支付商户号</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input('mch_id',array('type'=>'text','class'=>'form-control','div'=>false,'label'=>false))}}
				<p><small>135平台可帮您开启微信支付，并发起收款指您公司的微信支付账号中。</small></p>
				<p><small>详情请联系客服咨询，新开通支付商户号填入。</small></p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-3 control-label" for="UserSettingMchId">商户服务号APPID</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input('sub_appid',array('type'=>'text','class'=>'form-control','div'=>false,'label'=>false))}}
				<p><small>支付后用户可选择是否关注公司服务号。</small></p>
			</div>
		</div>

	</div>
		
		
		{{if $wx_id}}
		<div class="tab-pane  {{if $_REQUEST['type'] == 'dev'}}active{{/if}}" id="wechat-dev-setting">
		<div class="alert alert-warning">
			提示：公众号授权可管理公众号素材，菜单与自定义回复需要进行开发者配置。
			<p style="color:red;">注意135的配置先提交保存，然后再提交保存微信端的设置</p>
		</div>
       
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">AppID(应用ID)</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input($wx_id.'.wxAppId',array('type'=>'text','class'=>'form-control','div'=>false,'label'=>false))}}
				<p><small>"AppID(应用ID)"可到微信开发者中心查看</small></p>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">AppSecret(应用密钥)</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input($wx_id.'.wxAppSecret',array('type'=>'text','class'=>'form-control','div'=>false,'label'=>false))}}
				<p><small>"AppSecret(应用密钥)"可到微信开发者中心查看</small></p>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">URL(服务器地址)</label>
			<div class="col-sm-9 controls">
				<p style="line-height:50px;">http://www.135plat.com/weixin/msg/{{$current_wxinfo['Wx']['id']}}</p>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">微信Token</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input($wx_id.'.token',array('type'=>'text','id'=>'WxToken','style'=>'width:400px;display:inline-block;','class'=>'form-control','div'=>false,'label'=>false))}}
				<button type="button" class="btn btn-default" onclick="$('#WxToken').val(randomString(32));">随机生成</button>
				<p><small>安全令牌长度为3-32字符,与微信开发者配置中填的Token一致</small></p>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">EncodingAESKey</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input($wx_id.'.wxAESKey',array('type'=>'text','id'=>'WxAESKey','style'=>'width:450px;display:inline-block;','class'=>'form-control','div'=>false,'label'=>false))}}
				<button type="button" class="btn btn-default" onclick="$('#WxAESKey').val(randomString(43));">随机生成</button>
				<p><small>消息加密密钥由43位字符组成，与微信开发者配置中填的EncodingAESKey一致</small></p>
			</div>
		</div>
		</div>
		{{/if}}
		{{if $CurrentUser['Company']}}
		<div class="tab-pane" id="wechat-company-setting">
		<div class="alert alert-warning">提示：企业公众号回调模式。</div>
       		
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">URL(服务器地址)</label>
			<div class="col-sm-9 controls">
				<p style="line-height:50px;">http://www.135plat.com/companies/cb/{{$CurrentUser['Company']['id']}}</p>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">微信Token</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input('UserSetting.Qy.token',array('type'=>'text','id'=>'QyToken','style'=>'width:400px;display:inline-block;','class'=>'form-control','div'=>false,'label'=>false))}}
				<button type="button" class="btn btn-default" onclick="$('#QyToken').val(randomString(32));">随机生成</button>
				<p><small>安全令牌长度为3-32字符,与微信开发者配置中填的Token一致</small></p>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">EncodingAESKey</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input('UserSetting.Qy.AESKey',array('type'=>'text','id'=>'QyAESKey','style'=>'width:450px;display:inline-block;','class'=>'form-control','div'=>false,'label'=>false))}}
				<button type="button" class="btn btn-default" onclick="$('#QyAESKey').val(randomString(43));">随机生成</button>
				<p><small>消息加密密钥由43位字符组成，与微信开发者配置中填的EncodingAESKey一致</small></p>
			</div>
		</div>
		</div>
		{{/if}}
		
		<div class="tab-pane {{if $_REQUEST['type'] == 'fonts'}}active{{/if}}" id="font-setting">
			<p style="color:red;">提示：仅白银VIP、黄金VIP会员可使用设置的字体。</p>
			<div class="alert alert-warning">
				<p>使用方法：</p>
				<p>1. 下载字体文件，将压缩包中的字体全部复制到“C:/windows/fonts”目录下，重启浏览器。</p>
				<p style="text-indent:2em;">中文字体文件1下载 <a href="https://pan.baidu.com/s/1eSNVfNW" target="_blank"><strong>https://pan.baidu.com/s/1eSNVfNW</strong></a>  提取码 <strong>uspd</strong> </p>
				<p style="text-indent:2em;">中文字体文件2下载 <a href="http://pan.baidu.com/s/1hrDEiKs" target="_blank"><strong>http://pan.baidu.com/s/1hrDEiKs</strong></a>  </p>
				
				<p style="text-indent:2em;">藏文字体文件下载 <a href="https://pan.baidu.com/s/1bp82FTH" target="_blank"><strong>https://pan.baidu.com/s/1bp82FTH</strong></a>  提取码 <strong>ecqf</strong> </p>
				
				
				<p>2. 勾选所需要的字体，提交保存后，刷新编辑器，即可出现勾选的字体。 </p>
				<p style="text-indent:2em;">字体为公司使用时，请注意公司是否有字体的版权。 </p>
				
				<p>3. 设置文字使用新字体后，请将样式内容转换成图片，否则手机端无法正常显示。 </p>
				<p>4. 更多字体，请关注“135编辑器”公众号反馈意见。 </p>
			</div>
			<div class="form-group">
				<p class="col-sm-3">选择字体 
				<button class="btn btn-default"><input type="checkbox" id="checkAllFonts" style="margin:0 0;" class="checkAllFonts">&nbsp;<label style="margin:0 0;font-weight: normal;" for="checkAllFonts">全选</label></button>
				</p>
				<div class="col-sm-12 controls">
					<ul id="settings-tab" class="nav nav-tabs">
			       	<li class="active"><a href="#zhongwen-fonts" data-toggle="tab"><span>中文简体字体</span></a></li>
			       	<li><a href="#fanti-fonts" data-toggle="tab"><span>中文繁体字体</span></a></li>
					<li><a href="#zangwen-fonts" data-toggle="tab"><span>藏文字体</span></a></li>
					</ul>
					<div class="tab-content">
					<div class="tab-pane active" id="zhongwen-fonts">
					
					<h2>免版权费字体</h2>
					{{$this->Form->input('fonts',array('multiple'=>'checkbox','options'=>array(
					
						//'文泉驿微米黑' => '文泉驿微米黑',
						//'文泉驿正黑'=>'文泉驿正黑',
						'新蒂小丸子'=>'新蒂小丸子',
						'新蒂下午茶基本版'=>'新蒂下午茶基本版',	
						//'站酷高端黑'=>'站酷高端黑',
						//'HappyZcool' => '站酷快乐体',	
						'书体坊赵九江钢笔行书' => '书体坊赵九江钢笔行书',		
						
						
						/*'Source Han Sans K ExtraLight'=>'思源黑体极细（ExtraLight）',
						'Source Han Sans K Light'=>'思源黑体细（Light）',
						'Source Han Sans K Regular'=>'思源黑体正常（Regular）',
						'Source Han Sans K Normal'=>'思源黑体普通（Normal）',
						'Source Han Sans K Medium'=>'思源黑体中等（Medium）',
						'Source Han Sans K Bold'=>'思源黑体粗（Bold）',						
						'Source Han Sans K Heavy'=>'思源黑体加厚（Heavy）',						
						'Droid Sans Fallback'=>'谷歌安卓字体',*/
						
					),'class'=>'','escape'=>false,'div'=>false,'label'=>false,'hiddenField'=>false))}}
					<h2>需要版权的字体</h2>
					{{$this->Form->input('fonts',array('multiple'=>'checkbox','options'=>array(
						'方正古隶简体'=>'方正古隶简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/EpEMWIIX_IBof.png">',
						'方正小篆体'=>'方正小篆体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/0B1Y4uoO_hEXw.png">',
						'方正卡通简体'=>'方正卡通简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/OCTHoW1B_MF6J.png">',
						'方正静蕾简体'=>'方正静蕾简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/IRrbO4Mi_ldiz.png">',
						'方正启体简体'=>'方正启体简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/tlYuUK3P_J6Yn.png">',
						'瘦金书_wjq135'=>'瘦金书 <img src="http://qdn.135editor.com/files/users/9/92806/201608/IomomF3R_G7TA.png">',
						'方正胖头鱼简体'=>'方正胖头鱼简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/GzrHtR8N_XO0l.png">',
						'方正华隶_GBK'=>'方正华隶_GBK <img src="http://qdn.135editor.com/files/users/9/92806/201608/rv4kId4e_bmOV.png">',
						'华文彩云'=>'华文彩云 <img src="http://qdn.135editor.com/files/users/9/92806/201608/N3RIGb60_64I4.png">',
						'方正流行体简体'=>'方正流行体简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/V79JWeoY_GQmA.png">',
						'方正铁筋隶书简体'=>'方正铁筋隶书简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/FClO8Zgy_0sQz.png">',
						'方正剪纸简体'=>'方正剪纸简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/0dCzgzld_X7v2.png">',
						'方正细圆简体'=>'方正细圆简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/vCc1Hhhi_sVQt.png">',
						'方正细倩简体'=>'方正细倩简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/x34JHdAq_l8cf.png">',
						'方正姚体'=>'方正姚体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/bpiS7vgJ_bcV2.png">',
						'方正喵呜体'=>'方正喵呜体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/ca3uU0IO_XBod.png">',
						'方正魏碑简体'=>'方正魏碑简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/THfcuexT_wlTD.png">',
						'方正美黑简体'=>'方正美黑简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/KduTZDMh_1Tk4.png">',
						'方正细珊瑚简体'=>'方正细珊瑚简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/LPI0ZCgo_cv4T.png">',
						'方正粗倩简体'=>'方正粗倩简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/Ca42ja21_gzFh.png">',
						'方正隶变简体'=>'方正隶变简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/9l4ztpRj_3SVw.png">',
						'方正粗圆简体'=>'方正粗圆简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/xd2Mmf8H_R7dT.png">',
						'方正少儿简体'=>'方正少儿简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/KPpCNpJe_yYS5.png">',
						'方正华隶简体'=>'方正华隶简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/BfiuRWoD_CNe9.png">',
						'方正水柱简体'=>'方正水柱简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/1EVXKJtr_r9fC.png">',
						'方正新舒体简体'=>'方正新舒体简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/xHH5K2vJ_cdhK.png">',
						'方正特粗光辉简体'=>'方正特粗光辉简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/o1asGkbG_GgMY.png">',
						
						'方正清刻本悦宋简体'=>'方正清刻本悦宋简体 <img src="http://image.135editor.com/files/users/9/92806/201609/6Z0Dbx9h_LS1x.png">',
						'草檀斋毛泽东字体'=>'草檀斋毛泽东字体 <img src="http://image.135editor.com/files/users/9/92806/201609/dIpn3SQj_rmPO.png">',
						
						'方正康体简体'=>'方正康体简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/8K6z22rz_kfY3.png">',
						'方正舒体'=>'方正舒体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/YIuuOUS6_5gaa.png">',
						'方正祥隶简体'=>'方正祥隶简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/GSiU7jfb_Lv9j.png">',
						'方正新报宋简体'=>'方正新报宋简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/hSsxWBeD_QFnV.png">',
						'方正硬笔行书简体'=>'方正硬笔行书简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/4VjGEPRG_ZkpS.png">',
						'方正平和简体'=>'方正平和简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/t0aD5sM1_ROf8.png">',
						'方正黄草简体'=>'方正黄草简体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/RYD9cdeD_3MZF.png">',
						'DFPWaWaW5-GB'=>'华康娃娃体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/mKp8ldRQ_jsw2.png">',
						'POP HandelGotD\-Cxibei'=>'华康POP <img src="http://qdn.135editor.com/files/users/9/92806/201608/NcYbiAhh_szU0.png">',
						'DFPShaoNvW5\-GB'=>'华康少女文字W5(P) <img src="http://qdn.135editor.com/files/users/9/92806/201608/GzRFyDs4_JAOU.png">',
						'DFPHaiBaoW12\-GB'=>'华康海报体W12(P) <img src="http://qdn.135editor.com/files/users/9/92806/201608/3QzeoyHe_iK2p.png">',
						'DFPBuDingW12\-GB'=>'华康布丁体W12(P) <img src="http://qdn.135editor.com/files/users/9/92806/201608/bvNunPqm_oJbz.png">',
						//''=>' <img src="">',
					),'class'=>'','escape'=>false,'div'=>false,'label'=>false,'hiddenField'=>false))}}
					</div>
					<div class="tab-pane" id="fanti-fonts">
					{{$this->Form->input('fonts',array('multiple'=>'checkbox','options'=>array(							
						'王汉宗新艺体一半调子'=>'王汉宗新艺体一半调子',
						'王汉宗粗黑体简'=>'王汉宗粗黑体简',
						'王漢宗中行書繁'=>'王漢宗中行書繁',
						'王漢宗細仿宋繁'=>'王漢宗細仿宋繁',
						'王漢宗勘亭流繁'=>'王漢宗勘亭流繁',
						'王漢宗空疊圓繁'=>'王漢宗空疊圓繁',
						'王漢宗酷正海報'=>'王漢宗酷正海報',						
						'王漢宗綜藝體繁'=>'王漢宗綜藝體繁',
						'王漢宗空疊圓繁'=>'王漢宗空疊圓繁',
						'王汉宗魏碑体一左下空阴'=>'王漢宗魏碑體——左下空陰 ',		
						
						/*'新蒂文徴明试用版'=>'新蒂文徴明试用版',
						
						
						'汉鼎繁报宋'=>'汉鼎繁报宋',
						'汉鼎繁琥珀'=>'汉鼎繁琥珀',
						'汉鼎简隶变'=>'汉鼎简隶变',
						'汉鼎繁特宋'=>'汉鼎繁特宋',
						'汉鼎繁淡古'=>'汉鼎繁淡古',
						'汉鼎繁特圆'=>'汉鼎繁特圆',
						'汉鼎繁叠圆'=>'汉鼎繁叠圆',
						'汉鼎繁勘亭'=>'汉鼎繁勘亭',
						'汉鼎繁特行'=>'汉鼎繁特行',*/				
					),'class'=>'','hiddenField'=>false,'escape'=>false,'div'=>false,'label'=>false))}}
					</div>
					<div class="tab-pane" id="zangwen-fonts">
					{{$this->Form->input('fonts',array('multiple'=>'checkbox','options'=>array(	
						'珠穆朗玛—乌金苏仁体'=>'珠穆朗玛—乌金苏仁体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/xE6nSNnm_9PVC.png">',
						'珠穆朗玛—敦煌体'=>'珠穆朗玛—敦煌体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/PNpvOER1_Oh5w.png">',
						'珠穆朗玛—小标题'=>'珠穆朗玛—小标题 <img src="http://qdn.135editor.com/files/users/9/92806/201608/BTScDsUl_qeLC.png">',
						'珠穆朗玛—标题体'=>'珠穆朗玛—标题体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/EIGAmEKg_gM3C.png">',
						'珠穆朗玛—柏簇体'=>'珠穆朗玛—柏簇体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/T9ov6nyJ_3IAj.png">',
						'珠穆朗玛—文告体'=>'珠穆朗玛—文告体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/7aSdgrKa_l4FU.png">',
						'珠穆朗玛—簇通体'=>'珠穆朗玛—簇通体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/faRL6UXw_6KHR.png">',
						'珠穆朗玛—雕版体'=>'珠穆朗玛—雕版体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/rLRXZORR_oVDT.png">',
						'珠穆朗玛—藏文篆体'=>'珠穆朗玛—藏文篆体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/YOfRc6vc_onf3.png">',
						'珠穆朗玛—乌金萨琼体'=>'珠穆朗玛—乌金萨琼体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/kFB1VFdL_hyeP.png">',
						'珠穆朗玛—乌金苏通体'=>'珠穆朗玛—乌金苏通体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/y8o8mJsl_QsSk.png">',
						'珠穆朗玛—丘伊体'=>'珠穆朗玛—丘伊体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/pAogwsiy_Z8ry.png">',
						'珠穆朗玛—乌金萨钦体'=>'珠穆朗玛—乌金萨钦体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/FleEGAr3_Pg4U.png">',
						'果洛德昂洒智—珠擦体'=>'果洛德昂洒智—珠擦体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/38sPlz6b_VQaU.png">',
						'果洛德昂洒智—艺琼体'=>'果洛德昂洒智—艺琼体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/FnLwhBqy_8BQj.png">',
						'The script of Zhangzhung Smar'=>'The script of Zhangzhung Smar <img src="http://qdn.135editor.com/files/users/9/92806/201608/RaHcHKuf_9b7j.png">',
						'玉翅-乌金体'=>'玉翅-乌金体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/mbYzjiNF_ZbeZ.png">',
						
						'藏研黑体'=>'藏研黑体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/WrIDjMMv_Nlhm.png">',
						'藏研白体'=>'藏研白体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/X2N5hXcm_jlr0.png">',
						'藏研乌坚体'=>'藏研乌坚体 <img src="http://qdn.135editor.com/files/users/9/92806/201608/vueEklgw_ZlqK.png">',
						
						
					),'class'=>'','hiddenField'=>false,'escape'=>false,'div'=>false,'label'=>false))}}
					</div>
					</div>
				</div>
			</div>
		</div>
		<div class="tab-pane  {{if !in_array($_REQUEST['type'],array('company','fonts','dev'))}}active{{/if}}" id="warter-mark-setting">
		
		<div class="alert alert-info">
			<p><strong>重要提示：</strong></p>
			<p>水印图片请使用透明png，尺寸不会缩放，按原水印图片尺寸作为水印</p>
			<p>设置水印位置后，水印才会生效</p>
			<p>同时设置了图片与文字时，仅图文水印生效。</p>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">水印图片</label>
			<div class="col-sm-9 controls">
				{{$this->MForm->swfupload('UserSetting.'.$wx_id.'.watermark',
					array('type'=>'text',
						'class'=>'form-control',
						'div'=>false,'label'=>false,
						'file_types'=>'*.png',
						'upload_limit'=>1,'isadmin' => false,
						'value'=>$this->data['UserSetting'][$wx_id]['watermark']
					))}}
				<p>提示：请使用透明png图片作为水印图片</p>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">水印文字</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input($wx_id.'.watermark_text',
					array('type'=>'text',
						'class'=>'form-control',
						'div'=>false,'label'=>false,'after'=>'<p>水印图片优先生效。如要取消水印图片使用文字水印，删除水印图片输入框中的网址提交保存即可。</p>',
					))}}
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">水印默认位置</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input($wx_id.'.watermark_pos',array(
					'type'=>'radio','class'=>'','legend'=>'',
					'div'=>'radios','label'=>false,
					'options' => array('0'=> '无水印<br>','1'=> '顶部上','2'=>'顶部中','3'=>'顶部右<br>','4'=>'中部左','5'=>'中部中','6'=>'中部右<br>','7'=>'底部左','8'=>'底部中','9'=>'底部右'),
					'after'=>'<p><br/>设置水印位置后，上传图片会自动加水印</p>',
				))}}
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="UserSettingEnlargeImage">样式转图时放大图片</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input('enlargeImage',array(
					'type'=>'checkbox','class'=>'',
					'div'=>'checkboxs','label'=>false,'value' => 1,
					'after'=>'<p><br/>放大字体使生成的图片更清晰。手机显示时，图片会自适应手机屏幕宽度，图片缩小显示，图片中的文字实际显示大小和普通正文差不多</p>',
				))}}
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-3 control-label" for="UserSettingUpToWechat">图片优先传至微信</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input('upToWechat',array(
					'type'=>'checkbox','class'=>'',
					'div'=>'checkboxs','label'=>false,'value' => 1,
					'after'=>'<p><br/>上传时图片直接传至微信，需要授权微信公众号，可节省文章同步微信的时间以及同步的成功率。（可能有显示破图的情况，不影响在微信网站的显示）</p>',
				))}}
			</div>
		</div>
		<hr>
		
		<div class="form-group">
			<label class="col-sm-3 control-label" for="UserSettingOpenCalendar">是否开放我的日历</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input('openCalendar',array(
					'type'=>'checkbox','class'=>'',
					'div'=>'checkboxs','label'=>false,'value' => 1,
					'after'=>'<p><br/>开放后，我的日历可分享给网友查看</p>',
				))}}
			</div>
		</div>
		<!-- <div class="form-group">
			<label class="col-sm-3 control-label" for="WxMenuName">消息转发至客服</label>
			<div class="col-sm-9 controls">
				{{$this->Form->input($wx_id.'.wxTrKf',array('type'=>'text','class'=>'form-control','div'=>false,'label'=>false))}}
				<p><small>开启微信客服后，未命中自动回复的消息，转发至客服</small></p>
			</div>
		</div> -->
		</div>
	{{/if}}
	
	
	<div class="form-group">
		<label class="col-sm-3 control-label"></label>
		<div class="col-sm-9">
		<input class="btn btn-primary" type="submit" value="提交">
		</div>
	</div>
	
{{$this->Form->end()}}
<br/><br/>
<hr/>
<br/><br/>
		<div class="ui-portlet-header">
	      <span class="title">已授权公众号</span>            
		</div>
		<table class="table">
			<thead><tr><td>公众号</td><td>授权时间</td><td>权限刷新时间</td><td>状态</td></tr></thead>
       <portlet title="已授权公众号" portlet="body" model="Oauthbind" info="conditions[user_id]=$current_user_id&conditions[source]=wechatComp" list_tpl="inner">
       		<!-- <a href="{{$this->Html->url('http://www.135plat.com/wxes/pinfo/'.$item['id'])}}" class="btn btn-lg btn-success"> {{$item['oauth_name']}} </a> &nbsp;
       		 -->
       		<tr><td>{{$item['oauth_name']}}</td><td>{{date('Y-m-d H:i',$item['created'])}}</td><td>{{date('Y-m-d H:i',$item['updated'])}}</td><td>{{if time() - $item['updated'] > 7200}} 已过期 {{/if}}</td></tr>
       </portlet>
       
       </table>
       <p>
	        <a target="_blank" href="http://www.135plat.com/books/chapter/2/28"> 取消已授权绑定公众号的方法</a>
		</p>
</div>			
<script>
$(function(){
	
	$(document).on('click','.checkAllFonts',function(){ // 全选
		if(this.checked){
			$('input[name="data[UserSetting][fonts][]"]:checkbox').prop('checked',true);
		}
		else{
			$('input[name="data[UserSetting][fonts][]"]:checkbox').prop('checked',false);
		}
	});
	
	{{if $_GET['type']=='dev'}}
		$('#settings-tab').find('a:eq(1)').trigger('click');
	{{elseif $_GET['type']=='fonts'}}
		$('#settings-tab').find('a:eq(2)').trigger('click');
	{{/if}}
})
</script>